﻿using Business.Base;
using Business.Base.Model;
using PLC.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Business.Base.Service
{
    public interface ICaculateService
    {
        #region 算法封装


        void ReCaculateRecord(Experiment exp);


        /// <summary>
        /// 根据获取的数据，计算出一条记录数据
        /// </summary>
        /// <param name="data">硬件获取到的数据</param>
        /// <returns>试验中的记录数据</returns>
        ExperimentRecord CaculateDataFromRecord(Experiment exp,EnvData data);

        /// <summary>
        /// 计算绘图的数据
        /// </summary>
        /// <param name="experiment">当前试验数据</param>
        /// <returns>绘图数据（包括绘图所需要的所有数据）</returns>
        BaseChartData CaculateChartData(Experiment experiment);

        /// <summary>
        /// 根据试验数据，试验的结论
        /// </summary>
        /// <param name="experiment"></param>
        void CaculateExperimentResult(ref Experiment experiment);
        #endregion
    }
}
